algorithm interview question for begineer